*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

header{
    background: lightblue;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
}
#head-part1{
    display: flex;
    margin-left: 20px;
}
#head-part1 nav a{
    padding-left: 40px;
    text-decoration: none;
    font-size: 21px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.721);
    cursor: pointer;
    transition: 0.5s ease all;
}
#head-part1 nav a:hover{
    color: rgba(2, 2, 171, 0.616);
}

#head-part2{
    display: flex;
    height: 40px;
    margin-right: 60px;
}
.input-here{
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
    padding-left: 15px;
    padding-right: 15px;
    border: 1px solid grey;
    font-size: 15px;
}
.search-button{
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
    padding-left: 15px;
    padding-right: 15px;
    border: 1px solid grey;
    font-size: 15px;
    background-color: rgba(0, 0, 128, 0.727);
    color: white;
    transition: 0.5s ease all;
}
.search-button:hover{
    background-color: rgb(3, 3, 104);
}

#anime-container{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    align-items: center;
    gap: 30px;
    padding: 40px;
}
.card{
    position: relative;
    top: 100px;
    width: 200px;
    height: 350px;
    overflow: hidden;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    /* transition: 0.2s ease all; */
    transition: transform 0.3s ease;
}
.card:hover{
    transform: scale(1.1);
}
#main-picture{
    width: 100%;
    height: 260px;
    object-fit: cover;
}
#main-picture:hover{
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.card h4{
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    padding: 15px;
}
.card:hover .overlay {
    opacity: 1;
}
.details{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}
.details span{
    font-size: 12px;
    opacity: 0.8;
}
.details p{
    font-size: 0.9rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 8;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.like-btn{
    all: unset;
    width: 32px;
    height: 32px;
    position: absolute;
    bottom: 10px;
    right: 20px;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.like-btn .heart-full { display: none; }
.like-btn .heart-outline { display: inline-block; }

.like-btn.active .heart-full { display: inline-block; }
.like-btn.active .heart-outline { display: none; }

.like-btn:hover{
    transform: scale(1.1);
}



.loading-spinner{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.241);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: white;
    font-size: 1.5rem;
}
.spin {
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 5px solid white;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}